Various electronic devices use haptic feedback systems to enhance the user experience. Smart phones, for example, often contain haptic feedback systems that create a vibrating or “buzzing” sensation in response to a user's finger touching a touch screen display. Such haptic feedback systems assure the user that the electronic device has detected the user's tactile input. Haptic feedback is particularly useful when the user is engaging in an activity that requires rapid tactile input (e.g., typing on a touch screen keyboard) so that the user can quickly determine whether each touch was detected.
Haptic feedback is generated by a vibration motor housed within the electronic device. A user may cause the vibration motor to begin vibrating by, e.g., touching the touch screen display. Once the vibration motor has begun vibrating, however, it cannot be stopped instantly. Instead, the vibration is gradually stopped over the course of a braking period during which a “brake” is applied to the vibration motor. The brake is applied to the motor until it has been determined that the vibration has stopped. Thus, accurately determining the time at which vibration stops is essential to stopping the braking period at an appropriate time.